package com.anjho.bean;

import java.io.Serializable;
import java.util.Map;

import javax.faces.context.FacesContext;

public abstract class GenericBean implements Serializable {

	private static final long serialVersionUID = 2941146782422586503L;
	
	protected Object getFromSession(String key) {
		Map<String, Object> sessionMap = FacesContext.getCurrentInstance()
				.getExternalContext().getSessionMap();
		return sessionMap.get(key);
	}

	protected void putInSession(String key, Object value) {
		FacesContext.getCurrentInstance().getExternalContext().getSessionMap()
				.put(key, value);
	}
}
